'use strict';
const db = uniCloud.database()
const collection = db.collection('houselist')
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ', event)
	const {id, ...params} = event // 结构复制，id赋给id变量，除了id之外的属性放到了params对象中
	const res = await collection.doc(id).update(params)
	//返回数据给客户端
	return res
};
